<!DOCTYPE html>
	<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>引用模板</title>
		<script type="text/javascript" src="js/vue.js"></script>
	</head>
	<body>

		<div class="container">

			<hello></hello>
			<template id="tmp">
				<div>
					<h2>{{msg}}</h2>
					<ul>
						<li v-for="val in arg">{{val}}</li>
					</ul>
				</div>
			</template>
		</div>

		<script type="text/javascript">
			var vm = new Vue({
				el:'.container',
				components:{
					'hello':{
						// template:'<ul><li v-for="val in arg">{{val}}</li></ul>', //普通方式
						template:'#tmp',//使用Vue中的template标签
						data(){
							return {
								msg:'你好Vue！',
								arg:['Tom','Lily','Lucy']
							}
						}
					}
				}
			});
		</script>
	</body>
	</html>	